<?php
  class Core_Mail extends Core_Mail_Mailer{
  	public function __construct($to, $subject, $msg){
  	  if(Zend_Registry::getInstance()->config->sendmail->enable == 1){
        $this->SMTP_PORT = Zend_Registry::getInstance()->config->sendmail->port;
        $this->SMTPSecure = Zend_Registry::getInstance()->config->sendmail->secure;
        
        $this->IsSMTP();
        $this->Priority     = Zend_Registry::getInstance()->config->sendmail->priority;
        $this->CharSet      = Zend_Registry::getInstance()->config->sendmail->charset;
        $this->Host         = Zend_Registry::getInstance()->config->sendmail->server;
        $this->ContentType  = Zend_Registry::getInstance()->config->sendmail->content->type;
        $this->Encoding     = Zend_Registry::getInstance()->config->sendmail->encoding;
        $this->SMTPAuth     = Zend_Registry::getInstance()->config->sendmail->auth;
        $this->Username     = Zend_Registry::getInstance()->config->sendmail->from->mail;
        $this->Password     = Zend_Registry::getInstance()->config->sendmail->password;
        $this->Subject      = "<" . Zend_Registry::getInstance()->config->sendmail->subject->default . "> " . $subject;
        $this->Body         = $msg;
        $this->From         = Zend_Registry::getInstance()->config->sendmail->from->mail;
        $this->FromName     = Zend_Registry::getInstance()->config->sendmail->from->name;
        $this->IsHTML(TRUE);
        
        $this->AddAddress($to);
        
        if(!$this->send()){
          return false;
        }
        else{
        	return true;
        }
      }
  	}
  }